namespace CloudNinja.Metering.Providers.Configuration.DatabaseSize
{
    using System.Configuration;

    public class DatabaseSizeMeteringProviderSettings : ConfigurationElement
    {
        [ConfigurationProperty("DefaultTenantIdPattern", IsRequired = true, DefaultValue = "tnt_{.+}")]
        public string DefaultTenantIdPattern
        {
            get
            {
                return (string)this["DefaultTenantIdPattern"];
            }

            set
            {
                this["DefaultTenantIdPattern"] = value;
            }
        }

        [ConfigurationProperty("DatabaseServers", IsDefaultCollection = false), ConfigurationCollection(typeof(DatabaseServersCollectionElement), AddItemName = "addConnectionString", ClearItemsName = "clearConnectionStrings", RemoveItemName = "removeConnectionString")]
        public DatabaseServersCollection DatabaseServers
        {
            get
            {
                return this["DatabaseServers"] as DatabaseServersCollection;
            }

            set
            {
                this["DatabaseServers"] = value;
            }
        }
    }
}